// Program List
PANEL = {}
PANEL.PButtons = {}
function PANEL:BuildList()
	// Remove all existing buttons
	for k, v in pairs( self.PButtons ) do
		if (v) then v:Remove() end
	end
	self.PButtons = {}
	
	// Get the program list
	local ps = C_PC.PList
	
	// Set our dimensions and position
	self:SetTall( #ps*20 )
	local x, y = self:GetPos()
	self:SetPos( x, self.ParentHeight - ((#ps+1)*20) )
	
	// Cycle through all the programs
	local cnt = 0
	for k, v in pairs( ps ) do
		// Get the program
		local prog = ProgramList[ v ]
		
		// Check the program is valid
		if (prog) then
			// Get our Y position
			cnt = cnt + 1
			local y = (k-1)*20
			
			// Build the button
			local btn = vgui.Create( "DButton" )
			btn:SetParent( self )
			btn:SetPos( 1, y )
			btn:SetSize( self:GetWide(), 18 )
			btn:SetText( "" )
			//btn:SetTextColor( Color( 0, 0, 0, 255 ) )
			btn.DoClick = function( self )
				RunConsoleCommand( "pc_command", "load_prog", self.PName )
				PCMod.StartMenu:SetV( false )
				PCMod.ProgramList:SetV( false )
			end
			btn.PName = prog.PName
			btn.NName = prog.NiceName
			
			btn.Paint = function( self )
				CurrentTheme:DrawProgramButton( 0, 0, self:GetWide(), self:GetTall(), self.Hovered, self.Depressed, self.NName )
				
			end
			
			// Store the button
			self.PButtons[k] = btn
		end
	end
end
function PANEL:SetV( v )
	self.Show = v
	self:SetVisible( v )
end
//function PANEL:Paint()
	//if ((self.Show) && (C_PC.Status==3)) then
		
	//end
//end
function PANEL:Think()
	if (PCMod.StartMenu.Show == false) then self:SetV( false ) end
end
vgui.Register( "ProgramList", PANEL, "PANEL" )